package br.mil.eb.pqrmnt7.scc.entity;


import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Access;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.AccessType;
import com.powerlogic.jcompany.commons.config.stereotypes.SPlcEntity;
import javax.persistence.Entity;
import javax.persistence.Transient;
/**
 * Classe Concreta gerada a partir do assistente
 */
@SPlcEntity
@Entity
@Table(name="TIPO_COMBUSTIVEL")
@SequenceGenerator(name="SE_TIPO_COMBUSTIVEL", sequenceName="SE_TIPO_COMBUSTIVEL")
@Access(AccessType.FIELD)


@NamedQueries({
	@NamedQuery(name="TipoCombustivelEntity.queryMan", query="from TipoCombustivelEntity"),
	@NamedQuery(name="TipoCombustivelEntity.querySelLookup", query="select id as id, nome as nome from TipoCombustivelEntity where id = ? order by id asc")
})
public class TipoCombustivelEntity extends TipoCombustivel {

	private static final long serialVersionUID = 1L;
 	
    /*
     * Construtor padrao
     */
    public TipoCombustivelEntity() {
    }
    
    public TipoCombustivelEntity(String nome) {
    	setNome(nome);
    }
    
	@Override
	public String toString() {
		return getNome();
	}

	@Transient
	private String indExcPlc = "N";	

	public void setIndExcPlc(String indExcPlc) {
		this.indExcPlc = indExcPlc;
	}

	public String getIndExcPlc() {
		return indExcPlc;
	}

	@Override
	public boolean equals(Object obj) {
		System.out.println("Chamou o Equals de TipoCombustivel...");
		if (obj instanceof TipoCombustivelEntity) {
			TipoCombustivel o = (TipoCombustivel) obj;
			return this.getNome().equalsIgnoreCase(o.getNome());
		} else {
			return false;
		}
	}
}
